<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<%@include file="jxInclude.jsp"%>

<LINK media=screen href="<%=jxPath%>/lib/themes/crispin/jxtheme.css" type=text/css charset=utf-8 rel=stylesheet>
<script type="text/javascript" src="<%=contextPath %>/js/checkUtil.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>生活部落后台管理系统</title>

<style>
.box {
	text-align:center;FLOAT:LEFT;BORDER-RIGHT: #a8bacd 1px solid; PADDING-RIGHT: 1px;BORDER-TOP: #a8bacd 1px solid; PADDING-LEFT: 1px; MARGIN-TOP: 3px; MARGIN-BOTTOM: 10px; PADDING-BOTTOM: 1px; BORDER-LEFT: #a8bacd 1px solid; WIDTH: 400px; PADDING-TOP: 1px; BORDER-BOTTOM: #a8bacd 1px solid; POSITION: relative
}
.box DIV{
	font-size:13px;font-weight:bold;padding-top:10px;padding-bottom:10px;
}
.box H3 {
	COLOR:#007734; PADDING-RIGHT: 0px; PADDING-LEFT: 10px; FONT-WEIGHT: bold; FONT-SIZE: 15px; BACKGROUND-IMAGE: url(<%=contextPath%>/images/bg_box_title.bmp); PADDING-BOTTOM: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #a8bacd 1px solid; TEXT-ALIGN: left
}
.btnLeft{
	float:left;width:100px
}
.btnRight{
	float:right;width:100px;padding-right:50px;
}
</style>
<script language='javascript'>
	window.addEvent('load', function(){
		if(window.parent.header && window.parent.main){
			window.parent.location.href="/manager/adminLogin.do";
		}
		adminLogin_init();
	});
	function adminLogin_init(){
		//inti button
		 var transmit = new Jx.Button({
		      label: '登录',
		      tooltip: '提交',
		      toggle: true,
		      enabled: true,
		      onDown: function(){subAction(this);}
		    }).addTo('toggleButton');
		 var cancel = new Jx.Button({
		      label: '取消',
		      tooltip: '取消',
		      toggle: true,
		      enabled: true,
		      onDown: function(){cancelInput();}
		    }).addTo('cancelButton');
	}
	function subAction(btn){
		if(validateSub()){
			btn.setEnabled(false);
			$("loginForm").submit();
		}
	}
	function validateSub(){
		var _tname = $("username").value;
		var _tpwd = $("password").value;
		var _tpsn = $("psnCard").value;
		if(_tname.trim().length < 1){
			alert("请输入用户名");
			$("username").value='';
			return false;
		}
		if(_tpwd.trim().length < 1){
			alert("请输入密码");
			$("password").value='';
			return false;
		}
		if(!checkIdcard(_tpsn)){
			$("psnCard").value='';
			return false;
		}
		return true;
		
	}
	function cancelInput(){
		$("username").value='';
		$("password").value='';
		$("psnCard").value='';
	}
</script>
</head>
<body>
<div style="align:center;padding-left:400px;padding-top:200px">
<s:form action="/manager/adminLogin.do?action=login" method="post" id="loginForm">
	<div style="font-size:13px;color:red;font-weight:bold"><s:property value="%{msg}"/></div>
	<div class="box">
		<H3>生活部落后台管理系统</H3>
		<div>
			账&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号:&nbsp;&nbsp;&nbsp;<input type="text" name="username" id="username" value="administrator">
		</div>
		<div>
			密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:&nbsp;&nbsp;&nbsp;<input type="password" name="password" id="password" value="0-=zhehai)_+">
		</div>
		<div>
			身份证号:&nbsp;&nbsp;&nbsp;<input type="text" name="psnCard" id="psnCard" value="371424198204251818">
		</div>
		<div style="text-align:center;padding-left:100px;">
			<div id="toggleButton" class="buttonBox btnLeft"></div>
			<div id="cancelButton" class="buttonBox btnRight"></div>
		</div>
	</div>
</s:form>
</div>
</body>
</html>